using System;
using System.Collections.Generic;
using System.Text;
using Zsa.Emulation.Cartridge;

namespace Zsa.Emulation.Mappers
{
    public class Cnrom : Mapper
    {
        public Cnrom()
            : base("CNROM", "CNROM", MapperTypeNumber.CNROM)
        {
        }

        internal override bool OnBankWrite(RomBankType romBank, ushort address, byte romByte)
        {
            if (romBank == Zsa.Emulation.Cartridge.RomBankType.ProgramRom)
            {
                SwapBank(Zsa.Emulation.Cartridge.RomBankType.VideoRom, romByte);
                return true;
            }
            return false;
        }
    }
}
